/* ============================================================
   Family Budget Planner — Global Stylesheet
   Design System: Refined Financial SaaS
   Aesthetic: Premium dark slate + teal accent
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg-base:        #0d1117;
  --bg-surface:     #161b22;
  --bg-elevated:    #1c2230;
  --bg-overlay:     #212836;

  --border-subtle:  rgba(99,119,147,0.18);
  --border-default: rgba(99,119,147,0.30);
  --border-accent:  rgba(45,212,191,0.45);

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;
  --text-inverse:   #0d1117;

  --accent:         #2dd4bf;       /* teal */
  --accent-dim:     rgba(45,212,191,0.12);
  --accent-glow:    rgba(45,212,191,0.25);

  --green:          #10b981;
  --green-dim:      rgba(16,185,129,0.12);
  --red:            #f43f5e;
  --red-dim:        rgba(244,63,94,0.12);
  --amber:          #f59e0b;
  --amber-dim:      rgba(245,158,11,0.12);
  --blue:           #3b82f6;
  --blue-dim:       rgba(59,130,246,0.12);
  --purple:         #8b5cf6;
  --purple-dim:     rgba(139,92,246,0.12);
  --pink:           #ec4899;
  --pink-dim:       rgba(236,72,153,0.12);

  --font-display:   'DM Serif Display', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      16px;
  --radius-xl:      24px;

  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:      0 12px 40px rgba(0,0,0,0.6);
  --shadow-accent:  0 0 32px rgba(45,212,191,0.15);

  --sidebar-w:      240px;
  --topbar-h:       64px;
  --transition:     all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 600; }
h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p  { color: var(--text-secondary); font-size: 0.95rem; }
.label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.mono  { font-family: 'DM Mono', 'Courier New', monospace; }

/* ─── Layout Shell ───────────────────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.sidebar-logo .logo-text { font-weight: 700; font-size: 0.88rem; line-height: 1.2; }
.sidebar-logo .logo-text span { color: var(--accent); }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section { margin-bottom: 20px; }
.nav-section-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0 10px; margin-bottom: 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  cursor: pointer; position: relative;
}
.nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--red);
  color: white; font-size: 0.65rem; font-weight: 700;
  padding: 2px 6px; border-radius: 100px;
}

.sidebar-footer {
  padding: 12px 10px 16px;
  border-top: 1px solid var(--border-subtle);
}
.household-chip {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px 10px; cursor: pointer;
  transition: var(--transition);
}
.household-chip:hover { border-color: var(--border-accent); }
.household-chip .hh-avatar {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.household-chip .hh-info { flex: 1; min-width: 0; }
.household-chip .hh-name { font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.household-chip .hh-role { font-size: 0.68rem; color: var(--text-muted); }

/* ─── Main Content ───────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Topbar ─────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 1rem; font-weight: 600; }
.topbar-subtitle { font-size: 0.8rem; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 12px; }

/* ─── Page Content ───────────────────────────────────────────── */
.page-content { flex: 1; padding: 28px; overflow-y: auto; }
.page-header { margin-bottom: 28px; }
.page-header h2 { margin-bottom: 4px; }

/* ─── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-default); }
.card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 18px;
}
.card-title { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ─── Stat Card ──────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-color, var(--accent));
  opacity: 0.7;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card .stat-icon {
  width: 38px; height: 38px;
  background: var(--icon-bg, var(--accent-dim));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 14px;
}
.stat-card .stat-value {
  font-size: 1.8rem; font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.stat-card .stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.stat-card .stat-delta {
  font-size: 0.75rem; font-weight: 600;
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 100px;
}
.stat-card .stat-delta.up { background: var(--green-dim); color: var(--green); }
.stat-card .stat-delta.down { background: var(--red-dim); color: var(--red); }
.stat-card .stat-delta.neutral { background: var(--amber-dim); color: var(--amber); }

/* ─── Grid System ────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-3-2 { grid-template-columns: 3fr 2fr; }
.grid-cols-2-1 { grid-template-columns: 2fr 1fr; }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 600;
  border: none; transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
}
.btn-primary:hover { background: #14b8a6; box-shadow: var(--shadow-accent); }
.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(244,63,94,0.2);
}
.btn-danger:hover { background: var(--red); color: white; }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px 12px; }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; border-radius: var(--radius-md); }

/* ─── Form Elements ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 7px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary);
}
.form-label .required { color: var(--red); margin-left: 3px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 5px; }
.form-error { font-size: 0.75rem; color: var(--red); margin-top: 5px; }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }

/* ─── Progress Bar ───────────────────────────────────────────── */
.progress-bar-wrap { margin-bottom: 14px; }
.progress-bar-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.progress-bar-label .pb-name { font-size: 0.85rem; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.progress-bar-label .pb-values { font-size: 0.78rem; color: var(--text-muted); }
.progress-track {
  height: 7px; background: var(--bg-overlay);
  border-radius: 100px; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 100px;
  background: var(--fill-color, var(--accent));
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
}
.progress-fill.over { background: var(--red); }

/* ─── Alert / Notice ─────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px; border-radius: var(--radius-md);
  font-size: 0.875rem; margin-bottom: 12px;
}
.alert-danger  { background: var(--red-dim);   border: 1px solid rgba(244,63,94,0.25); color: var(--red); }
.alert-warning { background: var(--amber-dim); border: 1px solid rgba(245,158,11,0.25); color: var(--amber); }
.alert-success { background: var(--green-dim); border: 1px solid rgba(16,185,129,0.25); color: var(--green); }
.alert-info    { background: var(--accent-dim); border: 1px solid var(--border-accent); color: var(--accent); }
.alert-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-body { flex: 1; }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.alert-msg { opacity: 0.85; }

/* ─── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 700;
}
.badge-green  { background: var(--green-dim);  color: var(--green); }
.badge-red    { background: var(--red-dim);    color: var(--red); }
.badge-amber  { background: var(--amber-dim);  color: var(--amber); }
.badge-blue   { background: var(--blue-dim);   color: var(--blue); }
.badge-purple { background: var(--purple-dim); color: var(--purple); }
.badge-accent { background: var(--accent-dim); color: var(--accent); }

/* ─── Table ──────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 11px 14px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
  padding: 13px 14px; font-size: 0.875rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-elevated); }
.data-table .td-amount { font-weight: 700; font-family: var(--font-display); }
.data-table .td-muted  { color: var(--text-muted); font-size: 0.8rem; }

/* ─── Avatar ─────────────────────────────────────────────────── */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: var(--text-inverse);
}

/* ─── Tag ────────────────────────────────────────────────────── */
.category-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600;
  background: var(--tag-bg, var(--accent-dim));
  color: var(--tag-color, var(--accent));
}

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 14px; opacity: 0.5; }
.empty-state h4 { color: var(--text-secondary); margin-bottom: 6px; }
.empty-state p  { font-size: 0.85rem; }

/* ─── Loading ────────────────────────────────────────────────── */
.spinner {
  width: 22px; height: 22px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Month Filter Pills ─────────────────────────────────────── */
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-pill {
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  cursor: pointer; transition: var(--transition);
}
.filter-pill:hover { border-color: var(--accent); color: var(--accent); }
.filter-pill.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
}

/* ─── Chart Container ────────────────────────────────────────── */
.chart-wrap { position: relative; }
.chart-wrap canvas { max-height: 280px; }

/* ─── Divider ────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border-subtle); margin: 20px 0; }

/* ─── Toasts / Notifications ─────────────────────────────────── */
#toast-container {
  position: fixed; top: 20px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 18px;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem; min-width: 280px; max-width: 380px;
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }
.toast-icon    { font-size: 16px; margin-top: 1px; }
.toast-body    { flex: 1; }
.toast-title   { font-weight: 700; margin-bottom: 2px; }
.toast-msg     { color: var(--text-muted); font-size: 0.8rem; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ─── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 28px; width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-title  { font-size: 1.1rem; font-weight: 700; }
.modal-close  { background: none; border: none; color: var(--text-muted); font-size: 20px; line-height: 1; padding: 4px; cursor: pointer; transition: var(--transition); border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--bg-elevated); color: var(--text-primary); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3-2, .grid-cols-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-240px); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .data-table { font-size: 0.8rem; }
  .data-table th, .data-table td { padding: 10px 10px; }
}

/* ─── Utility Classes ────────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-sm  { gap: 8px; }
.gap-md  { gap: 16px; }
.gap-lg  { gap: 24px; }
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-amber   { color: var(--amber); }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.85rem; }
.text-xs      { font-size: 0.75rem; }
.font-bold    { font-weight: 700; }
.font-medium  { font-weight: 500; }
.mt-sm  { margin-top: 8px; }
.mt-md  { margin-top: 16px; }
.mt-lg  { margin-top: 24px; }
.mb-sm  { margin-bottom: 8px; }
.mb-md  { margin-bottom: 16px; }
.mb-lg  { margin-bottom: 24px; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-full   { width: 100%; }
.hidden   { display: none; }
.cursor-pointer { cursor: pointer; }
.rounded-full   { border-radius: 100px; }

/* ─── Landing Page Specifics ─────────────────────────────────── */
.landing-body { background: var(--bg-base); overflow-x: hidden; }
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,17,23,0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.landing-nav .nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1rem; }
.landing-nav .nav-logo .logo-icon { width: 30px; height: 30px; background: linear-gradient(135deg, var(--accent), #0ea5e9); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.landing-nav .nav-links { display: flex; align-items: center; gap: 28px; }
.landing-nav .nav-links a { font-size: 0.875rem; color: var(--text-secondary); transition: var(--transition); }
.landing-nav .nav-links a:hover { color: var(--text-primary); }
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 100px 20px 60px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(45,212,191,0.1), transparent),
              radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59,130,246,0.08), transparent);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(99,119,147,0.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(99,119,147,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-dim); border: 1px solid var(--border-accent);
  border-radius: 100px; padding: 5px 14px;
  font-size: 0.78rem; font-weight: 700; color: var(--accent);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 22px;
}
.hero h1 { margin-bottom: 20px; }
.hero h1 span { color: var(--accent); font-style: italic; }
.hero p { font-size: 1.1rem; max-width: 520px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 40px; justify-content: center;
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
}
.hero-stat .s-value { font-size: 1.6rem; font-weight: 800; font-family: var(--font-display); color: var(--text-primary); }
.hero-stat .s-label { font-size: 0.78rem; color: var(--text-muted); }

.features-section { padding: 90px 48px; max-width: 1200px; margin: 0 auto; }
.features-section .section-label { text-align: center; margin-bottom: 8px; }
.features-section h2 { text-align: center; margin-bottom: 48px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 24px;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--border-accent); transform: translateY(-3px); box-shadow: var(--shadow-accent); }
.feature-icon { font-size: 28px; margin-bottom: 14px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p  { font-size: 0.85rem; }

.cta-section {
  padding: 90px 48px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(45,212,191,0.07), transparent);
}
.cta-section h2 { margin-bottom: 14px; position: relative; }
.cta-section p  { margin-bottom: 32px; position: relative; }
.cta-section .btn { position: relative; }

.landing-footer {
  padding: 24px 48px; border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-between;
}
.landing-footer p { font-size: 0.8rem; }

/* ─── Login Page ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex;
  background: var(--bg-base);
}
.auth-side {
  width: 480px; flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  padding: 40px;
}
.auth-side .auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 48px; font-weight: 700; }
.auth-side .auth-logo .logo-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent), #0ea5e9); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.auth-form-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 360px; }
.auth-form-wrap h2 { margin-bottom: 6px; }
.auth-form-wrap .auth-sub { margin-bottom: 32px; }
.auth-visual {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(45,212,191,0.08), transparent);
}
.auth-visual .av-content { position: relative; z-index: 1; text-align: center; padding: 40px; }
.auth-visual .av-card {
  background: var(--bg-surface); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 24px; width: 300px;
  text-align: left; box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
}
.tabs {
  display: flex; background: var(--bg-elevated);
  border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px;
}
.tab-btn {
  flex: 1; padding: 8px; border: none; background: none;
  font-size: 0.85rem; font-weight: 600; color: var(--text-secondary);
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer; transition: var(--transition);
}
.tab-btn.active { background: var(--bg-surface); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.tab-content { display: none; }
.tab-content.active { display: block; }

@media (max-width: 768px) {
  .landing-nav { padding: 14px 20px; }
  .landing-nav .nav-links { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .features-section, .cta-section { padding: 60px 20px; }
  .hero { padding: 80px 20px 40px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .auth-side { width: 100%; border-right: none; }
  .auth-visual { display: none; }
  .landing-footer { flex-direction: column; gap: 10px; text-align: center; }
}
